{extend name="default/base" /}
{block name="title"}{:WSTConf('CONF.shopName')} - {:WSTConf('CONF.shopSlogan')}{/block}
{block name="meta"}
<meta name="description" content="{:WSTConf('CONF.seoShopDesc')}">
<meta name="keywords" content="{:WSTConf('CONF.seoShopKeywords')}">
{/block}
{block name="css"}
<link href="__STYLE__/css/index.css?v={$v}" rel="stylesheet">
{/block}
{block name="main"}
{wst:goods type="appraise" id="appr" cat="334" key="htKey" num="10"}
{/wst:goods}
{/*分类、广告、品牌*/}
<div class="index-main">
	<div class="index-left">
	</div>

	<div class="index-right">
		{/* 横栏广告  */}
		<div class="wst-ads" >
			<div class="wst-slide" id="wst-slide">
				<ul class="wst-slide-items">
					{wst:ads code="ads-index" cache='86400'}
						<a href="{$vo.adURL}" {if ($vo['isOpen'])}target='_blank'{/if} {if ($vo['adURL']!='')}onclick="WST.recordClick({$vo['adId']})"{/if}><li style="background: url(__ROOT__/{$vo.adFile}) no-repeat  scroll center top;background-size:cover;" ></li></a>
					{/wst:ads}
				</ul>
				<div class="wst-slide-numbox">
					<div class="wst-slide-controls">
					  	{wst:ads code="ads-index" cache='86400' key='k'}
						  	{if condition="$k+1 eq 1"}
						  		 <span class="curr"> </span>
						  	{else/}
						  		 <span class=""> </span>
						  	{/if}
						{/wst:ads}
					</div>
				</div>
			</div>
		</div>




		{/* 品牌 */}
		<div class="index-brands">
			<ul class="brand-item">
				{volist name="$catNames" id="cb" key="ckey" length="7"}
				<a {if($ckey<2)}class="brand-curr"{/if} href="{:url('home/goods/lists',['cat'=>$cb['catId']])}"><li><em></em>{:WSTMSubstr($cb['catName'],0,4)}</li></a>
				{/volist}
				<div class="wst-clear"></div>
			</ul>

			{/* 分类下的品牌 */}
			{volist name="$catNames" id="cb" key="cbkey" length="7"}
			<div class="brand-box" id="brand-box-{$cbkey}" {if($cbkey>1)} style="display:none;" {/if}>
				<ul class="brand-img">
					{wst:brand cat="$cb['catId']" id="bvo" num='14' cache='86400'}
						<a href="{:url('home/goods/lists',['cat'=>$cb['catId'],'brand'=>$bvo['brandId']])}">
							<li><img class='goodsImg' data-original="__ROOT__/{$bvo['brandImg']}"/></li>
						</a>
					{/wst:brand}
				</ul>
			</div>
			{/volist}


		</div>
	</div>
</div>

{/* 4个广告 */}
<ul class="fads">
	{wst:ads code="index-four-ads" id="fads" num="4"}
	<li>
		<a href="{$fads['adURL']}" {if ($fads['adURL']!='')}onclick="WST.recordClick({$fads['adId']})"{/if}>
			<img class='goodsImg' style="width:290px;height:202px;" data-original="__ROOT__/{$fads['adFile']}">
		</a>
	</li>
	{/wst:ads}
</ul>

<div class='wst-main'>
	<div class='wst-container'>
	{/* 推荐/最新/精品/热销 */}


	{/*推荐*/}
	<div class="rnbh">
		<div class="rnbh-l">
			<ul class="rnbh-nav" type="rec">
				<li><a href="javascript:void(0)">商品推荐</a></li>
				{volist name="$catNames" id="cb" length="9"}
				<li><a href="{:url('home/goods/lists',['cat'=>$cb['catId']])}">{:WSTMSubstr($cb['catName'],0,4)}</a></li>
				{/volist}
			</ul>
			{/*前5个推荐商品*/}
			<div class="rnbh-goods-box" id="rec-gbox-0">
				{wst:goods type='recom' cache="86400" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/* 每个分类推荐下的商品 */}
			{volist name="$catNames" id="cb" key="cbkey" length="9"}
			<div class="rnbh-goods-box" id="rec-gbox-{$cbkey}" style="display:none;">
				{wst:goods type='recom' cache="86400" cat="$cb['catId']" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/volist}
		</div>
		<div class="rnbh-r">
			<div class="rnbh-r-title">
				店铺公告
				<a class="rnbh-r-more" href="{:url('/home/news/nlist',['catId'=>11])}"> &gt;&gt; </a>
			</div>
			<ul class="news-item">
				{wst:article cat="new" cat="11" num='12' cache='86400'}
					<a href="{:url('home/news/view',['id'=>$vo['articleId']])}"><li>{$vo['articleTitle']}</li></a>
		        {/wst:article}
			</ul>
		</div>
	</div>



	{/*             				新品                              */}
	<div class="rnbh">
		<div class="rnbh-l">
			<ul class="rnbh-nav" type="new">
				<li><a href="javascript:void(0)">最新上架</a></li>
				{volist name="$catNames" id="cb" length="9"}
				<li><a href="{:url('home/goods/lists',['cat'=>$cb['catId']])}">{:WSTMSubstr($cb['catName'],0,4)}</a></li>
				{/volist}
			</ul>
			{/*前5个新品*/}
			<div class="rnbh-goods-box" id="new-gbox-0">
				{wst:goods type='new' cache="86400" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/* 每个分类推荐下的商品 */}
			{volist name="$catNames" id="cb" key="cbkey" length="9"}
			<div class="rnbh-goods-box" id="new-gbox-{$cbkey}" style="display:none;">
				{wst:goods type='new' cache="86400" cat="$cb['catId']" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/volist}
		</div>
		<div class="rnbh-r">
			<div class="rnbh-r-title">
				促销资讯
				<a class="rnbh-r-more" href="{:url('/home/news/nlist',['catId'=>12])}"> &gt;&gt; </a>
			</div>
			<ul class="news-item">
				{wst:article cat="new" cat="12" num='12' cache='86400'}
					<a href="{:url('home/news/view',['id'=>$vo['articleId']])}"><li>{$vo['articleTitle']}</li></a>
		        {/wst:article}
			</ul>
		</div>
	</div>


	{/*             				精品促销                              */}
	<div class="rnbh">
		<div class="rnbh-l">
			<ul class="rnbh-nav" type="best">
				<li><a href="javascript:void(0)">精品促销</a></li>
				{volist name="$catNames" id="cb" length="9"}
				<li><a href="{:url('home/goods/lists',['cat'=>$cb['catId']])}">{:WSTMSubstr($cb['catName'],0,4)}</a></li>
				{/volist}
			</ul>
			{/*前5个精品*/}
			<div class="rnbh-goods-box" id="best-gbox-0">
				{wst:goods type='best' cache="86400" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/* 每个分类推荐下的商品 */}
			{volist name="$catNames" id="cb" key="cbkey" length="9"}
			<div class="rnbh-goods-box" id="best-gbox-{$cbkey}" style="display:none;">
				{wst:goods type='best' cache="86400" cat="$cb['catId']" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/volist}
		</div>
		{/* 用户好评 */}
		<div class="rnbh-r">
			<div class="rnbh-r-title">用户好评</div>
			<ul class="appr-item">
				{volist name="$appraise" id="arri"}
				<li onclick="location.href='{:url('home/goods/detail',['id'=>$arri['goodsId']])}'">
					<img class='goodsImg' data-original="__ROOT__/{$arri['goodsImg']}" style="display:block;float:left;" />
					<div class="apprDetail">
						<p>{$arri['goodsName']}</p>
						<span>"{$arri['content']}"</span>
					</div>
				</li>
				{/volist}
				
			</ul>
		</div>
	</div>


	{/*             				热销商品                              */}
	<div class="rnbh">
		<div class="rnbh-l">
			<ul class="rnbh-nav" type="hot">
				<li><a href="javascript:void(0)">热销商品</a></li>
				{volist name="$catNames" id="cb" length="9"}
				<li><a href="{:url('home/goods/lists',['cat'=>$cb['catId']])}">{:WSTMSubstr($cb['catName'],0,4)}</a></li>
				{/volist}
			</ul>
			{/*前5个热销商品*/}
			<div class="rnbh-goods-box" id="hot-gbox-0">
				{wst:goods type='hot' cache="86400" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/* 每个分类推荐下的商品 */}
			{volist name="$catNames" id="cb" key="cbkey" length="9"}
			<div class="rnbh-goods-box" id="hot-gbox-{$cbkey}" style="display:none;">
				{wst:goods type='hot' cache="86400" cat="$cb['catId']" num='5'}
				<div class="rnbh-goods">
					<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$vo["goodsId"])}" target="_blank">
						<img class='goodsImg' data-original="__ROOT__/{:WSTImg($vo['goodsImg'])}"  title="{$vo['goodsName']}"/>
					</a>
					<p class="rnbh-goodsName">
						<a href='{:Url("home/goods/detail","id=".$vo["goodsId"])}' target='_blank'>
							{$vo['goodsName']}
						</a>
					</p>
					<div class="rnbh-goodsInfo">
						<span class="rnbh-goodsprice">￥{$vo['shopPrice']}</span>
						<span class="rnbh-goodssale">成交量：<em>{$vo['saleNum']}</em></span>
					</div>
					<a class="rnbh-addcart" href="javascript:WST.addCart({$vo['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/volist}
		</div>
		{/* 热销右侧广告位 */}
		<div class="rnbh-r" style="width:222px;height:352px;">
			{wst:ads code="index-hot" id="adh"}
			<a href="{$adh['adURL']}" {if ($adh['adURL']!='')}onclick="WST.recordClick({$adh['adId']})"{/if} >
				<img class='goodsImg' style="width:222px;height:352px;" data-original="__ROOT__/{$adh['adFile']}">
			</a>
			{/wst:ads}
		</div>
	</div>
</div>
{/* 楼层商品 */}
{volist name="$floors" id="vo" key="l" length="10"}
{/* 楼层顶部广告 */}
{php}$adsCode = "ads-".$l."-1";{/php}
{wst:ads code="$adsCode" num="1" cache='86400' id="tad"}
<div class="floor-top-ads">
	<a href="{$tad['adURL']}" {if ($tad['adURL']!='')}onclick="WST.recordClick({$tad['adId']})"{/if} ><img class='goodsImg' data-original="__ROOT__/{$tad['adFile']}"></a>
</div>
{/wst:ads}

	<div class="floor-main">
		<div class="floor-title">
				{:WSTMSubstr($vo['catName'],0,4)}
				<span>
					{php}
						$catId1 = $vo['catId'];
						$cat2Name = '';
						foreach($vo['children'] as $cat2){
							$url = url('home/goods/lists',['cat'=>$cat2['catId']]);
							$cat2Name .= '<a href="'.$url.'">'.$cat2['catName'].'</a> / ';
						}
						$cat2Name = rtrim($cat2Name,'/ ');
						echo $cat2Name;
					{/php}
				</span>
		</div>
		<div class="floor-box">
			{/*楼层左侧热卖排行*/}
			<div class="floor-lr-box wst-lfloat">
				<p class="lr-title">热卖排行</p>
				{wst:goods type="hot" id="ht" cat="$catId1" key="htKey" num="10"}
					<div class="lr-top1 j-hot-news-{$l}" id="hot-news-{$l}-{$htKey}" {if($htKey>0)}style="display:none"{/if}>
						<a href="{:Url("home/goods/detail","id=".$ht["goodsId"])}">
							<img class='goodsImg' data-original="__ROOT__/{$ht['goodsImg']}" />
							<div class="lr-goodsInfo">
								<p class="lr-gName">{$ht['goodsName']}</p>
								<p class="lr-gPrice">￥{$ht['shopPrice']}</p>
								<p class="lr-gSale">成交量：<em>{$ht['saleNum']}</em></p>
							</div>
						</a>
					</div>
					<ul class="j-hot-li-{$l} lr-gName-item" data="{$l}-{$htKey}" {if($htKey==0)}style="display:none"{/if}>
						<a href="{:Url('home/goods/detail','id='.$ht['goodsId'])}"><li>{$ht['goodsName']}</li></a>
					</ul>
				{/wst:goods}
			</div>
			{/*楼层广告位*/}
			<div class="floor-ads-box">
				{/*  楼层左侧广告  */}
				{wst:ads code="ads-$l-2" cache='86400' id="fl" key='fk' num="2"}
				{php}++$fk;{/php}
				<div class="floor-ads{$fk}">
					<img class='goodsImg' data-original="__ROOT__/{$fl['adFile']}" />
				</div>
				{/wst:ads}
			</div>
			{/*楼层6件商品*/}
			<div class="floor-goods-box">
				{wst:goods type="recom" num="6" cat="$vo['catId']" id="frec"}
				<div class="rnbh-goods">
						<a class="irnbn-imgbox" href="{:Url("home/goods/detail","id=".$frec["goodsId"])}" target="_blank">
							<img class='goodsImg' data-original="__ROOT__/{$frec['goodsImg']}" />
						</a>
						<p class="rnbh-goodsName">
							<a href='{:Url("home/goods/detail","id=".$frec["goodsId"])}' target='_blank'>
								{$frec['goodsName']}
							</a>
						</p>
						<div class="rnbh-goodsInfo">
							<span class="rnbh-goodsprice">￥{$frec['shopPrice']}</span>
							<span class="rnbh-goodssale">成交量：<em>{$frec['saleNum']}</em></span>
						</div>
						<a class="rnbh-addcart" href="javascript:WST.addCart({$frec['goodsId']});" >加入购物车</a>
				</div>
				{/wst:goods}
			</div>
			{/*楼层右侧好评推荐*/}
			<div class="floor-lr-box wst-lfloat">
				<p class="lr-title">好评推荐</p>
				{wst:goods type="appraise" id="appr" cat="$catId1" key="htKey" num="10"}
					<div class="lr-top1 j-top-news-{$l}" id="lr-top1-{$l}-{$htKey}" {if($htKey > 0)}style="display:none;"{/if}>
						<a href="{:Url("home/goods/detail","id=".$appr["goodsId"])}">
							<img class='goodsImg' data-original="__ROOT__/{$appr['goodsImg']}" />
							<div class="lr-goodsInfo">
								<p class="lr-gName">{$appr['goodsName']}</p>
								<p class="lr-gPrice">￥{$appr['shopPrice']}</p>
								<p class="lr-gSale">
									{php}$score = ceil($appr['totalScore']);{/php}
									{for start=0 end="$score"}
										<img src="__ROOT__/wstshop/home/view/default/img/img_scdp.png" />
									{/for}
								</p>
							</div>
						</a>
					</div>
					<ul class="j-top-li-{$l} lr-gName-item" data="{$l}-{$htKey}" {if($htKey == 0)}style="display:none;" {/if}>
						<a href="{:Url("home/goods/detail","id=".$appr["goodsId"])}"><li>{$appr['goodsName']}</li></a>
					</ul>
					
				{/wst:goods}
			</div>
		</div>
	</div>

{/volist}

{/* 右侧菜单栏  */}
{include file="default/right_cart"/}
{/block}
{block name="js"}
<script type='text/javascript' src='__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js?v={$v}'></script>
<script type='text/javascript' src='__STYLE__/js/index.js?v={$v}'></script>
{/block}
{/block}